package com.mhc.suzuki.constant;

/**
 * Created by HMJ on 2017/8/29.
 */
public enum CreditStatusEnum {
    //待录入
    BE_ENTERED(0, "待录入"),
    ENTERED(1, "已录入");

    private Integer code;
    private String name;

    CreditStatusEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static String getNameByCode(Integer code) {
        for (CreditStatusEnum item : CreditStatusEnum.values()) {
            if (item.getCode().equals(code)) {
                return item.getName();
            }
        }
        return "";
    }

}
